#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

int n;
char color[4] = {'R', 'B', 'G'};

/*
since we have there color so we don't need to consider the influence after changing the color

we just change the same color different from the color which is on the both sides
*/

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    string s;
    cin >> n;
    cin >> s;
    s = "?" + s;

    int res = 0;
    for(int i = 1; i < n; i ++){
        if(s[i] == s[i + 1]){
            if(i + 2 <= n){
                for(int j = 0; j < 3; j ++){
                    if(color[j] != s[i] && color[j] != s[i + 2]){
                        s[i + 1] = color[j];
                        res ++;
                        break;
                    }
                }
            }else{
                for(int j = 0; j < 3; j ++){
                    if(color[j] != s[i]){
                        s[i + 1] = color[j];
                        res ++;
                        break;
                    }
                }
            }
        }
    }

    cout << res << '\n';
    for(int i = 1; i <= n; i ++) cout << s[i];


    return 0;
}